package com.example.demo.repository;

import com.example.demo.dataobject.Food;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface FoodRepository extends JpaRepository<Food,Integer> {
    List<Food> findByFoodType(Integer foodType);
    List<Food> findByFoodTypeOrderByCarbonWater(Integer foodType);
    List<Food> findByFoodTypeOrderByCarbonWaterDesc(Integer foodType);
    List<Food> findByFoodNameLikeOrderByCarbonWater(String foodName);
}
